package ui.swing.tree.filesystem;

import java.io.File;

import javax.swing.tree.DefaultMutableTreeNode;

public class FileExplorerContext {
	
	static final int TABLE_VIEW = 0;
	static final int LIST_VIEW = 1;
	
	private DefaultMutableTreeNode node_choosed;
	
	private boolean showFileInLeftAllowed = true;
	
	private int currentRightViewComponent = TABLE_VIEW;

	int getCurrentRightViewComponent() {
		return currentRightViewComponent;
	}

	void setCurrentRightViewComponent(int currentRightViewComponent) {
		this.currentRightViewComponent = currentRightViewComponent;
	}

	File getFile_choosed() {
		return getFn_choosed().getFile();
	}

	boolean isShowFileInLeftAllowed() {
		return showFileInLeftAllowed;
	}

	void setShowFileInLeftAllowed(boolean showFileInLeftAllowed) {
		this.showFileInLeftAllowed = showFileInLeftAllowed;
	}

	public FileNode getFn_choosed() {
		return (FileNode)getNode_choosed().getUserObject();
	}

	public DefaultMutableTreeNode getNode_choosed() {
		return node_choosed;
	}

	public void setNode_choosed(DefaultMutableTreeNode nodeChoosed) {
		node_choosed = nodeChoosed;
	}
	
}